cmake_minimum_required(VERSION 3.21)

project(textures)

set(CMAKE_CXX_STANDARD 17)

aux_source_directory(. SRC_LIST)

include_directories(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/include)

SET(CMAKE_VERBOSE_MAKEFILE ON)

add_definitions(-DSTB_IMAGE_IMPLEMENTATION)

add_executable(${PROJECT_NAME} ${SRC_LIST})

target_link_libraries(${PROJECT_NAME} PRIVATE glad::glad glfw glm::glm stb::stb)

execute_process(COMMAND ${CMAKE_COMMAND} -E del ${CMAKE_CURRENT_BINARY_DIR}/shader.vs ${CMAKE_CURRENT_BINARY_DIR}/shader.fs)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/shader.vs ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/shader.fs ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/container.jpg ${CMAKE_CURRENT_BINARY_DIR})
